package com.sanjin.controller;

import com.sanjin.entity.SysLog;
import com.sanjin.service.SysLogService;
import com.sanjin.utils.ResponseVoUtils;
import com.sanjin.vo.ResponseVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @description:
 * @author: sanjin
 * @date: 2019/5/9 22:42
 */
@Api(tags = "用户操作日志")
@RestController
@RequestMapping("/syslog")
public class SysLogController {

    @Autowired
    private SysLogService sysLogService;

    @ApiOperation(value = "获取所有用户操作记录")
    @GetMapping("/list")
    public ResponseVo getSysLogs() {
        List<SysLog> sysLogs = sysLogService.getSysLogs();
        return ResponseVoUtils.success(sysLogs);
    }

}
